package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.SendRecordingDao;
import com.sugon.entity.SendRecordingEntity;
import com.sugon.service.SendRecordingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 派工记录Service实现类
 *
 * @author sugon
 * @date 2019-09-05 14:29:47
 */
@Service("sendRecordingService")
public class SendRecordingServiceImpl implements SendRecordingService {
    @Autowired
    private SendRecordingDao sendRecordingDao;

    @Override
    public SendRecordingEntity queryObject(String id) {
        return sendRecordingDao.queryObject(id);
    }

    @Override
    public List<SendRecordingEntity> queryList(Map<String, Object> map) {
        return sendRecordingDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return sendRecordingDao.queryTotal(map);
    }

    @Override
    public int save(SendRecordingEntity sendRecording) {
        sendRecording.setId(RandomUtil.randomString(32));
        return sendRecordingDao.save(sendRecording);
    }

    @Override
    public int update(SendRecordingEntity sendRecording) {
        return sendRecordingDao.update(sendRecording);
    }

    @Override
    public int delete(String id) {
        return sendRecordingDao.delete(id);
    }

    @Override
    public int deleteBatch(String[] ids) {
        return sendRecordingDao.deleteBatch(ids);
    }
}
